<?php
class SiteController extends Controller {
  
    
    public function init() {
        parent::init();
        
        if(!Yii::app()->user->isGuest){
            //$homeText=Yii::app()->user->isMerchant? 'merchant.page.breadcrumbs':'user.page.breadcrumbs';
            $homeText=Yii::app()->user->displayName;
            $this->breadcrumbs = array(
                Lang::t($homeText) => Yii::app()->user->returnUrl,
            );
        }
    }

    public function accessRules(){
        return array(
            array('allow',
                'users'=>array('@'),
            ),
            array('deny'),
        );
    }
    
    public function actionIndex() {
        $this->render('index');
    }

}